package com.cms.dao;

import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import com.cms.model.vo.SysUser;
import tk.mybatis.mapper.common.Mapper;

public interface SysUserDao extends Mapper<SysUser>{

	SysUser selectUserByloginNameAndStatus(@Param("userLoginName") String userLoginName,@Param("userStatus") Long userStatus);
	
	Long selectUserLoginNameCheck(@Param("userLoginName") String userLoginName, @Param("userId") Integer userId);
	
	List<SysUser> selectSysUserList(SysUser user);

	void updateUserByStatus(Map<String,Object> params);

	@Update("update sys_user set user_password = #{editpwd,jdbcType=VARCHAR} where user_id =  #{userId,jdbcType=INTEGER} and user_password =  #{password,jdbcType=VARCHAR}")
	int updatePassword(@Param("userId")Integer userId,@Param("password") String password,@Param("editpwd") String editpwd);

}
